<template>
    <div class="bottom">
        <div class="innerwrap">
            <!-- <input type="checkbox" @clcik="allCheckClick" v-model="allCheck"> -->
            <div class="text">
                <p>已完成：<span>{{doneTodosProps.length}}</span>/</p>
                <p>全部：<span>{{todos.length}}</span></p>
            </div>
            <!-- <button @click="allDet">清空所有已完成的任务</button> -->
        </div>
    </div>
</template>

<script>
    import {mapState} from 'vuex'
    export default {
        name:"Home-Bottom",
        props:['todos','doneTodosProps'],
        data(){
            return {
                allCheck:false
            }
        },
        methods: {
            allDet(){
                this.$store.dispatch('Home/allDelDoneTodo',this.doneTodos)
            }
        },
        mounted() {
            this.$store.dispatch('Home/getDoneLength')
            // console.log(this.doneTodos)
        },
        computed:{
            ...mapState('Home',['doneTodos'])
        }
    }
</script>

<style scoped lang="less">
    .bottom{
        width: 45vw;
        // display: flex;
        margin: 0 auto;
        padding-top: 2.1vw;
        padding-bottom: 2.1vw;

        .innerwrap{
            display: flex;
            justify-content: space-between;
            padding: 0 1.5vw;
        }

        .text{
            width: 60%;
            display: flex;
            text-align: left;
            span{
                font-size: 1.4vw;
                color: rgb(155, 22, 22);
                font-weight: 1000;

                &:first-child{
                    margin-right: 0.8vw;
                }
            }
        }

        button{
            background: rgb(224, 66, 66);
            color: #fff;
            border: none;
            height: 2.4vw;
            padding: 0 1vw;
            border-radius:0.4vw;
            font-size: 0.8vw;
            cursor: pointer;

            &:hover{
                background: rgb(151, 31, 31);
            }
        }
    }
</style>